(function() {
    'use strict';

    angular
        .module('byibserverApp')
        .controller('OtherSafeguard2ndDetailController', OtherSafeguard2ndDetailController);

    OtherSafeguard2ndDetailController.$inject = ['$scope', '$rootScope', '$stateParams', 'previousState', 'entity', 'OtherSafeguard2nd', 'OtherSafeguard', 'Product'];

    function OtherSafeguard2ndDetailController($scope, $rootScope, $stateParams, previousState, entity, OtherSafeguard2nd, OtherSafeguard, Product) {
        var vm = this;

        vm.otherSafeguard2nd = entity;
        vm.previousState = previousState.name;

        var unsubscribe = $rootScope.$on('byibserverApp:otherSafeguard2ndUpdate', function(event, result) {
            vm.otherSafeguard2nd = result;
        });
        $scope.$on('$destroy', unsubscribe);
    }
})();
